//
//  HLUserInfo.m
//  
//
//  Created by hulian-ios on 16/12/18.
//  Copyright © 2016年 hulian-ios. All rights reserved.
//

#import "HLUserInfo.h"

@implementation HLUserInfo

+ (HLUserInfo *)shared
{
    static dispatch_once_t onceToken;
    static id instance;
    dispatch_once(&onceToken, ^{
        instance = [self new];
    });
    return instance;
}



/**
 存入登录信息

 @param account 登录的结果
 */
+ (void)saveAccount:(HLUserLoginResult *)account
{
    [NSKeyedArchiver archiveRootObject:account toFile:NHLoginAccount];
}


/**
 取出登录信息

 @return 返回登录信息
 */
+ (HLUserLoginResult *)account
{
    HLUserLoginResult *account = [NSKeyedUnarchiver unarchiveObjectWithFile:NHLoginAccount];
    return account;
}


@end
